<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/plugins/easyui/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/plugins/easyui/themes/icon.css">
    <script type="text/javascript" src="/static/plugins/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/static/plugins/easyui/jquery.easyui.min.js"></script>
    <!--引入中文包-->
    <script type="text/javascript" src="/static/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/static/js/index.js"></script>
    <script type="text/javascript" src="/static/js/cashier.js"></script>
    <%--商品列表的视图引入--%>
    <script type="text/javascript" src="http://www.w3cschool.cc/try/jeasyui/datagrid-detailview.js"></script>
    <%--引入时间--%>
    <script type="text/javascript">
        window.onload = function() {
            var show = document.getElementById("show");
            setInterval(function() {
                var time = new Date();   // 程序计时的月从0开始取值后+1
                var m = time.getMonth() + 1;
                var t = time.getFullYear() + "-" + m + "-"
                    + time.getDate() + " " + time.getHours() + ":"
                    + time.getMinutes() + ":" + time.getSeconds();
                show.innerHTML = t;
            }, 1000);
        };
    </script>
</head>
<body>
    <%--布局面板--%>
    <div id="cc" class="easyui-layout" fit="true">
        <%--   =============左侧面板==================  --%>
        <div data-options="region:'west',title:'收银',split:true" style="width:500px">
            <div id="p" class="easyui-panel"
                 style="width:510px;height:200px;padding:10px;background:#fafafa;"
                 data-options="noheader:true,
                collapsible:true,minimizable:true,maximizable:true">
                <%--会员模块div--%>
                <table>
                    <tr>
                        <td>
                            <div id="memberMsg_div" align="left">
                                <p>
                                    店铺名称:<input id="shopInfo" class="easyui-combobox" name="shopName"
                                           data-options="panelHeight:'auto',textField:'name',valueField:'name',url:'/shop/listAll.do' ">
                                </p>
                                <p>会员卡号: <input id="memberInfo" name="cardNumber" style="border-style:none" readonly="readonly"></p>
                                <p>会员名字: <input name="name" style="border-style:none" readonly="readonly"></p>
                                <p>卡内余额: <input name="balance" style="border-style:none" readonly="readonly"></p>
                                <a  class="easyui-linkbutton" data-cmd="memberMsg">会员详情</a>
                            </div>
                        </td>
                        <td>
                            <%--计算,挂单等div--%>
                            <div align="right">
                                <div id="show" align="left">
                                    <button style="position:absolute;bottom:0;"></button>
                                </div>
                                <p>
                                    <font size="4" color="red">
                                        商品总计:
                                    </font>
                                </p>
                                <p><span id="totalAmount_span">
                                </span >元</p>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="entryOrder" class="easyui-penal">
                <form id="bill_form" method="post">
                    <table id="bill_table" align="center" >
                        <tr>
                            <td align="center" style="width:75px">编码</td>
                            <td align="center" style="width:75px">价格</td>
                            <td style="width:75px" align="center">商品名</td>
                            <td style="width:75px" align="center">数量</td>
                            <td style="width:75px" align="center">小计</td>
                            <td align="center" style="width:75px">编辑</td>
                        </tr>

                    <%--创建提交参数的隐藏值--%>
                    <input id="cardNumber" type="hidden" name="member.cardNumber">
                    <input id="shopName" type="hidden" name="shop_name">
                    <input id="billitem_id" type="hidden" name="bill_id">
                        <tr id="base_tr" class="copy_tr">
                            <td align="center">
                                <input id="bill_id" tag="pid"  name="id" type="number"  style="width:75px"/>
                            </td>
                            <td align="center">
                                <input id="salePrice" tag="salePrice" class="salePrice" type="number" name="salePrice"  style="width:75px" />
                            </td>
                            <td align="center">
                                <input id="name"  name="name"  style="width:75px"/>
                            </td>
                            <td align="center">
                                <input id="num"  tag="number"  class="num"  name="num" type="number" onchage="onchange()" style="width:75px" />
                            </td>
                            <td align="center">
                                <input id="amount" name="amount" type="number" style="width:75px" />
                            </td>
                            <td align="center">
                                <input id="add" type="button" value="增"  style="width:30px" />
                                <input id="del" type="button" value="减" style="width:30px" />
                            </td>
                        </tr>
                    </table>
                </form>
                <div>
                    <table  align="center">
                        <tr>
                            <td align="right"><a style="width: 156px" class="easyui-linkbutton" data-cmd="stay" >挂单</a></td>
                            <td align="right"><a style="width: 156px" class="easyui-linkbutton" data-cmd="getpay">取单</a></td>
                            <td align="right"><a style="width: 156px" class="easyui-linkbutton" data-cmd="pay">结账</a></td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <%--    =============右侧面板==================   --%>
        <div data-options="region:'center',title:'商品明细'" style="padding:5px;background:#eee;">
            <table id="pro_datagrid" class="easyui-datagrid">
            </table>
        </div>
    </div>
    <%--    ===============会员列表信息弹出窗口=================   --%>
    <div id="memberList_dialog" class="easyui-dialog" data-options="title:'编辑',iconCls:'icon-myedit',closed:true">
        <%--会员表格--%>
        <table id="member_datagrid">
        </table>
    </div>
    <%--会员信息列表按钮--%>
    <div id="memberList_btn">
        <a class="easyui-linkbutton" iconCls="icon-add" data-options="plain:true" data-cmd="sendMember"/>确定</a>
    </div>

    <%--收银--%>
    <%--按钮--%>
    <div id="pro_toolbar">
        <a class="easyui-linkbutton" iconCls="icon-add" data-options="plain:true" data-cmd="add"/>新增</a>
        <a class="easyui-linkbutton" iconCls="icon-edit" data-options="plain:true" data-cmd="edit" />编辑</a>
        <a class="easyui-linkbutton" iconCls="icon-remove" data-options="plain:true" data-cmd="del" />删除</a>
    </div>
    <%--表单按钮--%>
    <div id="member_toolbar">
        <a class="easyui-linkbutton" iconCls="icon-add" data-options="plain:true" data-cmd="saved"/>保存</a>
        <a class="easyui-linkbutton" iconCls="icon-edit" data-options="plain:true"  data-cmd="cancel">取消</a>
    </div>

    <%--类型弹出窗口--%>
    <div id="member_dialog" class="easyui-dialog" data-options="title:'挂单信息',iconCls:'icon-myedit',closed:true">
        <!--创建表单-->
        <table id="onAccountTable">
        </table>
    </div>
</body>
</html>
